import { GET, POST, PUT, DELETE } from '@/utils/request'

/**
 * 分页获取事件列表
 * @param {Number} pageNum
 * @param {Number} pageSize
 */
export const getEventList = (params) => GET('/eventManagement/getAll', params)

/**
 * 创建事件
 * @param {String} name 事件名
 * @param {String} description 场景描述
 * @param {String} data json字符串类型，存储数据描述
 */
export const postEvent = (params) => POST('/eventManagement/insert', params)

/**
 * 更新事件
 *  @param {String} name 事件名
 * @param {String} description 场景描述
 * @param {String} data json字符串类型，存储数据描述
 */
export const putEvent = (params) => PUT('/eventManagement/update', params)

/**
 * 删除事件
 * @param {Number} eventId
 */
export const delEvent = (eventId) => DELETE(`/eventManagement/delete?eventId=${ eventId }`)
